package avicit.bdp.dds.dao.mapper;

import avicit.bdp.common.base.BaseDAO;
import avicit.bdp.dds.dao.entity.ProjectUser;
import org.apache.ibatis.annotations.Param;

/** project user mapper interface */
public interface ProjectUserMapper extends BaseDAO<ProjectUser> {

  /**
   * delete project user relation
   *
   * @param projectId projectId
   * @param userId userId
   * @param orgIdentity orgIdentity
   * @return delete result
   */
  int deleteProjectRelation(
      @Param("projectId") String projectId,
      @Param("userId") String userId,
      @Param("orgIdentity") String orgIdentity);

  /**
   * query project relation
   *
   * @param projectId projectId
   * @param userId userId
   * @return project user relation
   */
  ProjectUser queryProjectRelation(
      @Param("projectId") String projectId, @Param("userId") String userId);
}
